﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Booking.ascx.cs" Inherits="UserControl_Booking" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<style type="text/css">
    .style1
    {
        height: 25px;
    }
</style>
<div class="full_width">
    <p class="breadcrumb">
        <a href="Default.aspx">Home</a> / <strong class="active-link">Page Title</strong></p>
</div>
<div class=" block">
    <div id="left-navigation">
        <h3>
            Functions</h3>
        <table width="100%" style="margin-right: 5px">
            <tr>
                <td>
                    <asp:Button ID="btnSave" runat="server" Text="SAVE" CssClass="button_all" OnClick="btnSave_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnPrint" runat="server" Text="PRINT JOB SHEET" CssClass="button_all"
                        OnClick="btnPrint_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnExt" runat="server" Text="EXIT" CssClass="button_all" />
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="right_three r-align  ">
    <h3>
        BOOKING</h3>
    <table id="table" width="100%">
        <tr>
            <td style="width: 80%" valign="top">
                <table id="table5">
                    <tr>
                        <td>
                            Job Number
                        </td>
                        <td>
                            <asp:TextBox ID="txtJobNo" Enabled="false" CssClass="inp-form" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Customer
                        </td>
                        <td>
                            <asp:TextBox ID="txtCustomer" CssClass="inp-form" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            Date
                        </td>
                        <td>
                            <asp:TextBox ID="txtDate" CssClass="inp-form" runat="server"></asp:TextBox>
                            <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtDate" Format="dd/MM/yyyy"
                                runat="server">
                            </asp:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Payment Method
                            <%--<asp:TextBox ID="TextBox1" CssClass="inp-form" runat="server"></asp:TextBox>--%>
                        </td>
                        <td>
                            <asp:RadioButton ID="rdCash" runat="server" Checked="true" GroupName="Method" />
                            Cash
                            <asp:RadioButton ID="rdOrther" runat="server" GroupName="Method" />
                            Orther
                        </td>
                        <td>
                            Current Status
                        </td>
                        <td>
                            <asp:TextBox ID="txtStatus" CssClass="inp-form" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Quotation Status
                            <%--<asp:TextBox ID="TextBox1" CssClass="inp-form" runat="server"></asp:TextBox>--%>
                        </td>
                        <td>
                            <asp:DropDownList ID="drQuotationStatus" runat="server" Height="22px" 
                                Width="150px">
                                <asp:ListItem Value="0">Waiting For Quote</asp:ListItem>
                                <asp:ListItem Value="1">Quoted</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            Approval Status
                        </td>
                        <td>
                            <asp:DropDownList ID="drApprovalStatus" runat="server" Height="22px" 
                                Width="150px">
                                <asp:ListItem Value="0">Pending Approval</asp:ListItem>
                                <asp:ListItem Value="1">Approved</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
<div class="full1">
    <ul class="tabs ">
        <li class="active"><a href="#a">Phone Details</a></li>
        <li><a href="#b">Fault Details</a></li>
    </ul>
    <div class="tab_container inner">
        <div class="tab_content" id="a" style="display: block;">
            <!--Content-->
            <p class="main">
                <%--<fieldset width="900">
                    <legend><span style="color: Red">Phone</span></legend>--%>
                <table  id="tab" width="100%">
                    <tr>
                        <td class="style1">
                        </td>
                        <td class="style2">
                        </td>
                        <td>
                            Manufacturer
                        </td>
                        <td>
                            <asp:TextBox ID="txtManufacturer" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Brand
                        </td>
                        <td class="style2">
                            <asp:TextBox ID="txtBrand" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                        <td>
                            Phone Model
                        </td>
                        <td>
                            <asp:TextBox ID="txtModel" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Phone IMEI No
                        </td>
                        <td class="style2">
                            <asp:TextBox ID="txtIMEI" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                        <td>
                            Phone MSN
                        </td>
                        <td>
                            <asp:TextBox ID="txtMSN" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Phone Condition
                        </td>
                        <td class="style2">
                            <asp:TextBox ID="txtConditions" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                        <td>
                            Phone Network with
                        </td>
                        <td>
                            <asp:TextBox ID="txtNetwork" runat="server" Width="90%" CssClass="inp-form"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Condition Details
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="txtConditionDetails" runat="server" TextMode="MultiLine" Width="96.5%"
                                CssClass="inp-form"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <%-- </fieldset>--%>
            </p>
        </div>
        <div class="tab_content" id="b" style="display: none;">
            <!--Content-->
            <asp:UpdatePanel ID="panelFaultList" runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnNext" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <table width="100%">
                        <tr>
                            <td class="style1" valign="top" style="text-align: right">
                                Fault Descriptions
                            </td>
                            <td>
                                <asp:ListBox ID="ListFault" runat="server" Height="150px" SelectionMode="Multiple"
                                    Width="350px"></asp:ListBox>
                                &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnNext" runat="server" Text=">>" OnClick="btnNext_Click" />
                            </td>
                            <td>
                                <asp:TextBox ID="txtFaultDes" runat="server" Width="200px" TextMode="MultiLine" Height="150px"
                                    CssClass="inp-form"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1" valign="top" style="text-align: right">
                                Orthe Instructions
                            </td>
                            <td colspan="2">
                                <asp:TextBox ID="txtInstruction" runat="server" TextMode="MultiLine" Width="96.5%"
                                    CssClass="inp-form"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1" valign="top" style="text-align: right">
                                Accessories With Phone
                            </td>
                            <td colspan="2">
                                <asp:TextBox ID="txtAccessories" runat="server" TextMode="MultiLine" Width="96.5%"
                                    CssClass="inp-form"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</div>

<script language="javascript" type="text/javascript">
    function GetvalueListBox() {
        //        var listbox = document.getElementById("<%=ListFault.ClientID %>");
        //        var textbox = document.getElementById("<%=txtFaultDes.ClientID %>");
        //        var myvalue = listbox.options(listbox.selectedIndex).text;
        //        textbox.value = myvalue;
        var listbox = document.getElementById("<%=ListFault.ClientID %>");
        var textbox = document.getElementById("<%=txtFaultDes.ClientID %>");
        var listLength = listbox.options.length;
        for (var i = 0; i < listLength; i++) {
            if (listbox.options[i].selected) {
                //lst2.options.add(sel.options[i].text);
                textbox.value += listbox.options(listbox.selectedIndex).text + ", ";
            }
        }
    }

</script>

